<extend name="public@base"/>

<block name="body">

    <include file="public@breadcrumb" />

    <!--container start-->
    <div class="container">
        <div class="row">
            <!--blog start-->
            <div class="col-lg-9 ">
                <php>
                    $pageStyle=[
                        'list_rows'=>$theme_vars['page_count'],
                        'prev'=>'上一页',
                        'next'=>'下一页'
                    ];
                </php>
                <portal:articles order="post.create_time DESC" page="$pageStyle" relation="categories" categoryIds="$category.id">
                    <div class="blog-item">
                    <div class="row">
                        <div class="col-lg-2 col-sm-2">
                            <div class="date-wrap">
                                <span class="date">{$vo.create_time|date='d'}</span>
                                <span class="month">{$vo.create_time|date='Y/m'}</span>
                            </div>

                        </div>
                        <div class="col-lg-10 col-sm-10">
                            <div class="blog-img">
                                <img src="{$vo.more.thumbnail|cmf_get_image_url}" alt="">
                            </div>

                        </div>
                    </div>
                    <div class="row">
                        <div class="col-lg-2 col-sm-2 text-right">

                            <notempty name="vo.post_source">
                                <div class="author">
                                    By
                                    <a href="#">
                                        {$vo.post_source}
                                    </a>
                                </div>
                            </notempty>
                            <php>$tags=explode(',',$vo['post_keywords']);</php>
                            <notempty name="$tags">
                                <ul class="list-unstyled">
                                    <volist name="$tags" id="v">
                                        <li>
                                            <a href="javascript:;">
                                                <em>{$v}</em>
                                            </a>
                                        </li>
                                    </volist>
                                </ul>
                            </notempty>
                            <div class="st-view">
                                <ul class="list-unstyled">
                                    <li>
                                        <a href="javascript:;"><i class="fa fa-eye"></i> {$vo.post_hits}</a>
                                    </li>
                                    <li>
                                        <a href="{:url('user/Favorite/add',array('id'=>$vo['id'],'cid'=>$category['id']))}"
                                           class="js-favorite-btn"
                                           data-id="{$vo.id}"
                                           data-table="portal_post"
                                           data-title="{:base64_encode($vo.post_title)}"
                                           data-url="{:cmf_url_encode('portal/Article/index',array('id'=>$vo['id'],'cid'=>$category['id']))}"
                                        >
                                            <i class="fa fa-star-o"></i>{$vo.post_favorites}
                                        </a>
                                    </li>
                                    <li>
                                        <a href="{:url('portal/Article/doLike',array('id'=>$vo['id']))}"
                                           class="js-count-btn"><i class="fa fa-thumbs-up"></i><span class="count">{$vo.post_like}</span></a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="col-lg-10 col-sm-10">
                            <h1>
                                <a href="{:cmf_url('portal/Article/index',['id'=>$vo.id,'cid'=>$category.id])}">
                                    {$vo.post_title}
                                </a>
                            </h1>
                            <p>
                                {$vo.post_excerpt}
                            </p>
                            <a href="{:cmf_url('portal/Article/index',['id'=>$vo.id,'cid'=>$category.id])}" class="btn btn-primary">
                                阅读详情
                            </a>
                        </div>
                    </div>
                </div>
                </portal:articles>
                <div class="text-center">
                    <ul class="pagination">
                        <page/>
                    </ul>
                </div>

            </div>
            <div class="col-lg-3">
                <include file="public@right_side" />
            </div>

            <!--blog end-->
        </div>

    </div>
    <!--container end-->


</block>